package com.lifa.service.impl;

import com.lifa.dao.JicunDao;
import com.lifa.entity.Chanpin;
import com.lifa.entity.Jicun;
import com.lifa.service.JicunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class JicunServiceImpl implements JicunService {
    @Autowired
    private JicunDao jicunDao;

    public List<Jicun> list() {
        return jicunDao.query();
    }
    @Override
    public List<Jicun> findAll(String name, int offset, int limit) {
        return jicunDao.queryPage(name,offset,limit);
    }

    @Override
    public int findTotalCount(String name) {
        return jicunDao.getTotalCount(name);
    }
}
